package com.tramy.data.export.model;

import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class Store {
    private BigDecimal storeId;

    private String storeCode;

    private String storeName;

    private String storeAid;

    private String storeOldCode;

    private String storeDestribe;

    private String storeRemark;

    private BigDecimal storeTypeId;

    private String storeTypeCode;

    private BigDecimal storeClassId;

    private String storeClass;

    private BigDecimal storeKindId;

    private String storeKind;

    private String storeStatus;

    private Date storeOpenTime;

    private Date storeCloseTime;

    private BigDecimal storeCloseResonId;

    private String storeCloseReson;

    private String storeCloseResonExplain;

    private BigDecimal storeDistrictId;

    private String storeDistrict;

    private BigDecimal storeOrgId;

    private String storeOrgCode;

    private BigDecimal customerId;

    private String customerCode;

    private BigDecimal storeChannelId;

    private String storeChannel;

    private BigDecimal storeLineId;

    private String storeLine;

    private BigDecimal storeLoopId;

    private String storeLoop;

    private BigDecimal lowerRate;

    private Short storeIsBilling;

    private BigDecimal deliverymanId;

    private BigDecimal salesmanId;

    private BigDecimal supervisorId;

    private BigDecimal officeDirectorId;

    private BigDecimal regionManagerId;

    private Short storeIsAlert;

    private String orderMethod;

    private String firstAlertTime;

    private String alertInterval;

    private BigDecimal alertTimes;

    private String stopMonileTime;

    private String netOrderTime;

    private String telStopOrder;

    private String notOrderRemark;

    private Date userMobileDate;

    private Date mobileBackDate;

    private BigDecimal mobileCash;

    private String useMobileRemark;

    private BigDecimal printCopies;

    private String printBackup;

    private String printOrderTitle;

    private Short showPriceRetail;

    private Short moneyIsShow;

    private Short orderSignIn;

    private BigDecimal maxMobileOrder;

    private BigDecimal maxOrder;

    private BigDecimal employeeNumber;

    private BigDecimal wageRates;

    private BigDecimal provinceId;

    private String cityId;

    private String areaId;

    private String countyName;

    private String storeAddress;

    private String deliveryAddress;

    private String storeLinkman;

    private String linkmanTel;

    private String linkmanMobile;

    private String linkmanMobile2;

    private String linkmanFax;

    private String linkmanEmail;

    private String postcode;

    private String receiveTime;

    private String testReport;

    private String kingdeeInterface;

    private Date createTime;

    private Date updateTime;

    private BigDecimal residualAmount;

    private BigDecimal creditLimit;

    private Short storeIsPrepay;

    private Short isQuickFreeze;

    private BigDecimal quickFreezeAmount;

    private String printDeliveryBatch;

    private Integer printDeliveryQueue;

    private Integer appOrderMaxNumber;

    private Integer printerType;

    public BigDecimal getStoreId() {
        return storeId;
    }

    public void setStoreId(BigDecimal storeId) {
        this.storeId = storeId;
    }

    public String getStoreCode() {
        return storeCode;
    }

    public void setStoreCode(String storeCode) {
        this.storeCode = storeCode == null ? null : storeCode.trim();
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName == null ? null : storeName.trim();
    }

    public String getStoreAid() {
        return storeAid;
    }

    public void setStoreAid(String storeAid) {
        this.storeAid = storeAid == null ? null : storeAid.trim();
    }

    public String getStoreOldCode() {
        return storeOldCode;
    }

    public void setStoreOldCode(String storeOldCode) {
        this.storeOldCode = storeOldCode == null ? null : storeOldCode.trim();
    }

    public String getStoreDestribe() {
        return storeDestribe;
    }

    public void setStoreDestribe(String storeDestribe) {
        this.storeDestribe = storeDestribe == null ? null : storeDestribe.trim();
    }

    public String getStoreRemark() {
        return storeRemark;
    }

    public void setStoreRemark(String storeRemark) {
        this.storeRemark = storeRemark == null ? null : storeRemark.trim();
    }

    public BigDecimal getStoreTypeId() {
        return storeTypeId;
    }

    public void setStoreTypeId(BigDecimal storeTypeId) {
        this.storeTypeId = storeTypeId;
    }

    public String getStoreTypeCode() {
        return storeTypeCode;
    }

    public void setStoreTypeCode(String storeTypeCode) {
        this.storeTypeCode = storeTypeCode == null ? null : storeTypeCode.trim();
    }

    public BigDecimal getStoreClassId() {
        return storeClassId;
    }

    public void setStoreClassId(BigDecimal storeClassId) {
        this.storeClassId = storeClassId;
    }

    public String getStoreClass() {
        return storeClass;
    }

    public void setStoreClass(String storeClass) {
        this.storeClass = storeClass == null ? null : storeClass.trim();
    }

    public BigDecimal getStoreKindId() {
        return storeKindId;
    }

    public void setStoreKindId(BigDecimal storeKindId) {
        this.storeKindId = storeKindId;
    }

    public String getStoreKind() {
        return storeKind;
    }

    public void setStoreKind(String storeKind) {
        this.storeKind = storeKind == null ? null : storeKind.trim();
    }

    public String getStoreStatus() {
        return storeStatus;
    }

    public void setStoreStatus(String storeStatus) {
        this.storeStatus = storeStatus == null ? null : storeStatus.trim();
    }

    public Date getStoreOpenTime() {
        return storeOpenTime;
    }

    public void setStoreOpenTime(Date storeOpenTime) {
        this.storeOpenTime = storeOpenTime;
    }

    public Date getStoreCloseTime() {
        return storeCloseTime;
    }

    public void setStoreCloseTime(Date storeCloseTime) {
        this.storeCloseTime = storeCloseTime;
    }

    public BigDecimal getStoreCloseResonId() {
        return storeCloseResonId;
    }

    public void setStoreCloseResonId(BigDecimal storeCloseResonId) {
        this.storeCloseResonId = storeCloseResonId;
    }

    public String getStoreCloseReson() {
        return storeCloseReson;
    }

    public void setStoreCloseReson(String storeCloseReson) {
        this.storeCloseReson = storeCloseReson == null ? null : storeCloseReson.trim();
    }

    public String getStoreCloseResonExplain() {
        return storeCloseResonExplain;
    }

    public void setStoreCloseResonExplain(String storeCloseResonExplain) {
        this.storeCloseResonExplain = storeCloseResonExplain == null ? null : storeCloseResonExplain.trim();
    }

    public BigDecimal getStoreDistrictId() {
        return storeDistrictId;
    }

    public void setStoreDistrictId(BigDecimal storeDistrictId) {
        this.storeDistrictId = storeDistrictId;
    }

    public String getStoreDistrict() {
        return storeDistrict;
    }

    public void setStoreDistrict(String storeDistrict) {
        this.storeDistrict = storeDistrict == null ? null : storeDistrict.trim();
    }

    public BigDecimal getStoreOrgId() {
        return storeOrgId;
    }

    public void setStoreOrgId(BigDecimal storeOrgId) {
        this.storeOrgId = storeOrgId;
    }

    public String getStoreOrgCode() {
        return storeOrgCode;
    }

    public void setStoreOrgCode(String storeOrgCode) {
        this.storeOrgCode = storeOrgCode == null ? null : storeOrgCode.trim();
    }

    public BigDecimal getCustomerId() {
        return customerId;
    }

    public void setCustomerId(BigDecimal customerId) {
        this.customerId = customerId;
    }

    public String getCustomerCode() {
        return customerCode;
    }

    public void setCustomerCode(String customerCode) {
        this.customerCode = customerCode == null ? null : customerCode.trim();
    }

    public BigDecimal getStoreChannelId() {
        return storeChannelId;
    }

    public void setStoreChannelId(BigDecimal storeChannelId) {
        this.storeChannelId = storeChannelId;
    }

    public String getStoreChannel() {
        return storeChannel;
    }

    public void setStoreChannel(String storeChannel) {
        this.storeChannel = storeChannel == null ? null : storeChannel.trim();
    }

    public BigDecimal getStoreLineId() {
        return storeLineId;
    }

    public void setStoreLineId(BigDecimal storeLineId) {
        this.storeLineId = storeLineId;
    }

    public String getStoreLine() {
        return storeLine;
    }

    public void setStoreLine(String storeLine) {
        this.storeLine = storeLine == null ? null : storeLine.trim();
    }

    public BigDecimal getStoreLoopId() {
        return storeLoopId;
    }

    public void setStoreLoopId(BigDecimal storeLoopId) {
        this.storeLoopId = storeLoopId;
    }

    public String getStoreLoop() {
        return storeLoop;
    }

    public void setStoreLoop(String storeLoop) {
        this.storeLoop = storeLoop == null ? null : storeLoop.trim();
    }

    public BigDecimal getLowerRate() {
        return lowerRate;
    }

    public void setLowerRate(BigDecimal lowerRate) {
        this.lowerRate = lowerRate;
    }

    public Short getStoreIsBilling() {
        return storeIsBilling;
    }

    public void setStoreIsBilling(Short storeIsBilling) {
        this.storeIsBilling = storeIsBilling;
    }

    public BigDecimal getDeliverymanId() {
        return deliverymanId;
    }

    public void setDeliverymanId(BigDecimal deliverymanId) {
        this.deliverymanId = deliverymanId;
    }

    public BigDecimal getSalesmanId() {
        return salesmanId;
    }

    public void setSalesmanId(BigDecimal salesmanId) {
        this.salesmanId = salesmanId;
    }

    public BigDecimal getSupervisorId() {
        return supervisorId;
    }

    public void setSupervisorId(BigDecimal supervisorId) {
        this.supervisorId = supervisorId;
    }

    public BigDecimal getOfficeDirectorId() {
        return officeDirectorId;
    }

    public void setOfficeDirectorId(BigDecimal officeDirectorId) {
        this.officeDirectorId = officeDirectorId;
    }

    public BigDecimal getRegionManagerId() {
        return regionManagerId;
    }

    public void setRegionManagerId(BigDecimal regionManagerId) {
        this.regionManagerId = regionManagerId;
    }

    public Short getStoreIsAlert() {
        return storeIsAlert;
    }

    public void setStoreIsAlert(Short storeIsAlert) {
        this.storeIsAlert = storeIsAlert;
    }

    public String getOrderMethod() {
        return orderMethod;
    }

    public void setOrderMethod(String orderMethod) {
        this.orderMethod = orderMethod == null ? null : orderMethod.trim();
    }

    public String getFirstAlertTime() {
        return firstAlertTime;
    }

    public void setFirstAlertTime(String firstAlertTime) {
        this.firstAlertTime = firstAlertTime == null ? null : firstAlertTime.trim();
    }

    public String getAlertInterval() {
        return alertInterval;
    }

    public void setAlertInterval(String alertInterval) {
        this.alertInterval = alertInterval == null ? null : alertInterval.trim();
    }

    public BigDecimal getAlertTimes() {
        return alertTimes;
    }

    public void setAlertTimes(BigDecimal alertTimes) {
        this.alertTimes = alertTimes;
    }

    public String getStopMonileTime() {
        return stopMonileTime;
    }

    public void setStopMonileTime(String stopMonileTime) {
        this.stopMonileTime = stopMonileTime == null ? null : stopMonileTime.trim();
    }

    public String getNetOrderTime() {
        return netOrderTime;
    }

    public void setNetOrderTime(String netOrderTime) {
        this.netOrderTime = netOrderTime == null ? null : netOrderTime.trim();
    }

    public String getTelStopOrder() {
        return telStopOrder;
    }

    public void setTelStopOrder(String telStopOrder) {
        this.telStopOrder = telStopOrder == null ? null : telStopOrder.trim();
    }

    public String getNotOrderRemark() {
        return notOrderRemark;
    }

    public void setNotOrderRemark(String notOrderRemark) {
        this.notOrderRemark = notOrderRemark == null ? null : notOrderRemark.trim();
    }

    public Date getUserMobileDate() {
        return userMobileDate;
    }

    public void setUserMobileDate(Date userMobileDate) {
        this.userMobileDate = userMobileDate;
    }

    public Date getMobileBackDate() {
        return mobileBackDate;
    }

    public void setMobileBackDate(Date mobileBackDate) {
        this.mobileBackDate = mobileBackDate;
    }

    public BigDecimal getMobileCash() {
        return mobileCash;
    }

    public void setMobileCash(BigDecimal mobileCash) {
        this.mobileCash = mobileCash;
    }

    public String getUseMobileRemark() {
        return useMobileRemark;
    }

    public void setUseMobileRemark(String useMobileRemark) {
        this.useMobileRemark = useMobileRemark == null ? null : useMobileRemark.trim();
    }

    public BigDecimal getPrintCopies() {
        return printCopies;
    }

    public void setPrintCopies(BigDecimal printCopies) {
        this.printCopies = printCopies;
    }

    public String getPrintBackup() {
        return printBackup;
    }

    public void setPrintBackup(String printBackup) {
        this.printBackup = printBackup == null ? null : printBackup.trim();
    }

    public String getPrintOrderTitle() {
        return printOrderTitle;
    }

    public void setPrintOrderTitle(String printOrderTitle) {
        this.printOrderTitle = printOrderTitle == null ? null : printOrderTitle.trim();
    }

    public Short getShowPriceRetail() {
        return showPriceRetail;
    }

    public void setShowPriceRetail(Short showPriceRetail) {
        this.showPriceRetail = showPriceRetail;
    }

    public Short getMoneyIsShow() {
        return moneyIsShow;
    }

    public void setMoneyIsShow(Short moneyIsShow) {
        this.moneyIsShow = moneyIsShow;
    }

    public Short getOrderSignIn() {
        return orderSignIn;
    }

    public void setOrderSignIn(Short orderSignIn) {
        this.orderSignIn = orderSignIn;
    }

    public BigDecimal getMaxMobileOrder() {
        return maxMobileOrder;
    }

    public void setMaxMobileOrder(BigDecimal maxMobileOrder) {
        this.maxMobileOrder = maxMobileOrder;
    }

    public BigDecimal getMaxOrder() {
        return maxOrder;
    }

    public void setMaxOrder(BigDecimal maxOrder) {
        this.maxOrder = maxOrder;
    }

    public BigDecimal getEmployeeNumber() {
        return employeeNumber;
    }

    public void setEmployeeNumber(BigDecimal employeeNumber) {
        this.employeeNumber = employeeNumber;
    }

    public BigDecimal getWageRates() {
        return wageRates;
    }

    public void setWageRates(BigDecimal wageRates) {
        this.wageRates = wageRates;
    }

    public BigDecimal getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(BigDecimal provinceId) {
        this.provinceId = provinceId;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId == null ? null : cityId.trim();
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId == null ? null : areaId.trim();
    }

    public String getCountyName() {
        return countyName;
    }

    public void setCountyName(String countyName) {
        this.countyName = countyName == null ? null : countyName.trim();
    }

    public String getStoreAddress() {
        return storeAddress;
    }

    public void setStoreAddress(String storeAddress) {
        this.storeAddress = storeAddress == null ? null : storeAddress.trim();
    }

    public String getDeliveryAddress() {
        return deliveryAddress;
    }

    public void setDeliveryAddress(String deliveryAddress) {
        this.deliveryAddress = deliveryAddress == null ? null : deliveryAddress.trim();
    }

    public String getStoreLinkman() {
        return storeLinkman;
    }

    public void setStoreLinkman(String storeLinkman) {
        this.storeLinkman = storeLinkman == null ? null : storeLinkman.trim();
    }

    public String getLinkmanTel() {
        return linkmanTel;
    }

    public void setLinkmanTel(String linkmanTel) {
        this.linkmanTel = linkmanTel == null ? null : linkmanTel.trim();
    }

    public String getLinkmanMobile() {
        return linkmanMobile;
    }

    public void setLinkmanMobile(String linkmanMobile) {
        this.linkmanMobile = linkmanMobile == null ? null : linkmanMobile.trim();
    }

    public String getLinkmanMobile2() {
        return linkmanMobile2;
    }

    public void setLinkmanMobile2(String linkmanMobile2) {
        this.linkmanMobile2 = linkmanMobile2 == null ? null : linkmanMobile2.trim();
    }

    public String getLinkmanFax() {
        return linkmanFax;
    }

    public void setLinkmanFax(String linkmanFax) {
        this.linkmanFax = linkmanFax == null ? null : linkmanFax.trim();
    }

    public String getLinkmanEmail() {
        return linkmanEmail;
    }

    public void setLinkmanEmail(String linkmanEmail) {
        this.linkmanEmail = linkmanEmail == null ? null : linkmanEmail.trim();
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode == null ? null : postcode.trim();
    }

    public String getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(String receiveTime) {
        this.receiveTime = receiveTime == null ? null : receiveTime.trim();
    }

    public String getTestReport() {
        return testReport;
    }

    public void setTestReport(String testReport) {
        this.testReport = testReport == null ? null : testReport.trim();
    }

    public String getKingdeeInterface() {
        return kingdeeInterface;
    }

    public void setKingdeeInterface(String kingdeeInterface) {
        this.kingdeeInterface = kingdeeInterface == null ? null : kingdeeInterface.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getResidualAmount() {
        return residualAmount;
    }

    public void setResidualAmount(BigDecimal residualAmount) {
        this.residualAmount = residualAmount;
    }

    public BigDecimal getCreditLimit() {
        return creditLimit;
    }

    public void setCreditLimit(BigDecimal creditLimit) {
        this.creditLimit = creditLimit;
    }

    public Short getStoreIsPrepay() {
        return storeIsPrepay;
    }

    public void setStoreIsPrepay(Short storeIsPrepay) {
        this.storeIsPrepay = storeIsPrepay;
    }

    public Short getIsQuickFreeze() {
        return isQuickFreeze;
    }

    public void setIsQuickFreeze(Short isQuickFreeze) {
        this.isQuickFreeze = isQuickFreeze;
    }

    public BigDecimal getQuickFreezeAmount() {
        return quickFreezeAmount;
    }

    public void setQuickFreezeAmount(BigDecimal quickFreezeAmount) {
        this.quickFreezeAmount = quickFreezeAmount;
    }

    public String getPrintDeliveryBatch() {
        return printDeliveryBatch;
    }

    public void setPrintDeliveryBatch(String printDeliveryBatch) {
        this.printDeliveryBatch = printDeliveryBatch == null ? null : printDeliveryBatch.trim();
    }

    public Integer getPrintDeliveryQueue() {
        return printDeliveryQueue;
    }

    public void setPrintDeliveryQueue(Integer printDeliveryQueue) {
        this.printDeliveryQueue = printDeliveryQueue;
    }

    public Integer getAppOrderMaxNumber() {
        return appOrderMaxNumber;
    }

    public void setAppOrderMaxNumber(Integer appOrderMaxNumber) {
        this.appOrderMaxNumber = appOrderMaxNumber;
    }

    public Integer getPrinterType() {
        return printerType;
    }

    public void setPrinterType(Integer printerType) {
        this.printerType = printerType;
    }

    public TramyStore convert() {
        TramyStore tramyStore = new TramyStore();
        BeanUtils.copyProperties(this,tramyStore);
        tramyStore.setEnterpriseId(78L);
        tramyStore.setStoreStatus("0".equals(this.getStoreStatus()) ? 1 : new Short("0"));
        tramyStore.setMoneyIsShow(Objects.equals(this.getMoneyIsShow(), "0") ? 1 : new Short("0"));
        tramyStore.setShowPriceRetail(Objects.equals(this.getShowPriceRetail(), "0") ? 1 : new Short("0"));
        if (this.getStoreId() != null) {
            tramyStore.setId(this.getStoreId().longValue());
        }
        if (this.getRegionManagerId() != null) {
            tramyStore.setRegionManagerId(this.getRegionManagerId().longValue());
        }
        if (this.getSalesmanId() != null) {
            tramyStore.setSalesmanId(this.getSalesmanId().longValue());
        }
        if (this.getSupervisorId() != null) {
            tramyStore.setSupervisorId(this.getSupervisorId().longValue());
        }
        if (this.getDeliverymanId() != null) {
            tramyStore.setDeliverymanId(this.getDeliverymanId().longValue());
        }
        if (this.getOfficeDirectorId() != null) {
            tramyStore.setOfficeDirectorId(this.getOfficeDirectorId().longValue());
        }
        if (this.getStoreOrgId() != null) {
            tramyStore.setStoreCompanyId(this.getStoreOrgId().longValue());
        }
        if (this.getStoreTypeId() != null) {
            tramyStore.setStoreTypeId(this.getStoreTypeId().longValue());
        }
        if (this.getStoreLineId() != null) {
            tramyStore.setStoreLineId(this.getStoreLineId().longValue());
        }
        if (this.getCustomerId() != null) {
            tramyStore.setSettlementCustomerId(this.getCustomerId().longValue());
        }
        tramyStore.setSettlementStatus(new Short("1"));
        if (this.getStoreDistrictId() != null) {
            tramyStore.setStoreDistrictId(this.getStoreDistrictId().longValue());
        }
        if (this.getStoreChannelId() != null) {
            tramyStore.setStoreChannelId(this.getStoreChannelId().longValue());
        }
        try {
            if (this.getAreaId() != null) {
                Integer areaId = AreaCodeAndIdMapper.getAreaId(this.getAreaId());
                if (areaId != null) {
                    //妈蛋真搞不懂区域ID用哪个字段啊.乱了乱了....
                    tramyStore.setStoreDistrictId(areaId.longValue());
                }
            }
        } catch (NumberFormatException e) {
            //e.printStackTrace();
        }
        return tramyStore;
    }
}